package pe.edu.sistemas.sisdiam.controller;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.context.FacesContext;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;

@Controller
@Scope("session")
public class RedireccionControllerSchedule {
	//hhhhhhhhhhhhh
	public void irSeleccionRoles() {
		try {
			FacesContext.getCurrentInstance().getExternalContext()
					.redirect("/sisdiam/common/seleccion_rolesSchedule.jsf");
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	

	public String irAdministrador() {
		System.out.println("irAdministrador");
		try {
			FacesContext
					.getCurrentInstance()
					.getExternalContext()
					.redirect(					
							"/sisdiam/atencion_docente/index_atencionSchedule.jsf");
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return "irAdministrador";
	}

	public String irOperador() {
		System.out.println("irOperador");
		try {
			FacesContext
					.getCurrentInstance()
					.getExternalContext()
					.redirect(					
							"/sisdiam/operador/index_docenteSchedule.jsf");
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return "irOperador";
	}

	public String irAtencionDocente() {
		System.out.println("irAtencionDocente");
		try {
			FacesContext
					.getCurrentInstance()
					.getExternalContext()
					.redirect(					
							"/sisdiam/atencion_docente/index_atencionSchedule.jsf");
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return "irAtencionDocente";
	}

	public String irSoporte() {
		System.out.println("irSoporte");
		try {
			FacesContext
					.getCurrentInstance()
					.getExternalContext()
					.redirect(					
							"/sisdiam/soporte/index_soporteSchedule.jsf");
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return "irSoporte";
	}
	public String irDecano() {
		System.out.println("irDecano");
		try {
			FacesContext
					.getCurrentInstance()
					.getExternalContext()
					.redirect(					
							"/sisdiam/decano/index_decanoSchedule.jsf");
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return "irDecano";
	}
}
